package com.liuguang.gateway;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @ClassName: GatewayApplication
 * @Description：
 * @Author: wanghr
 * Date: 5:09 PM 2020/9/11
 * Version: 1.0
 */
@SpringBootApplication
public class GatewayApplication {
    private static final Logger logger = LoggerFactory.getLogger(GatewayApplication.class);
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(GatewayApplication.class);
        String[] activeProfiles = applicationContext.getEnvironment().getActiveProfiles();
        String applicationName = applicationContext.getApplicationName();
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append("\r\n=================================================\r\n");
        stringBuffer.append("\r\n==========gateway===="+activeProfiles[0]+"=======");
        stringBuffer.append("\r\n=================================================\r\n");
        logger.info(stringBuffer.toString());
    }
}
